<?php
    require_once('../includes/DbConnector.php');
    if(isset($_POST['action']) && !empty($_POST['action'])) {
        // INPUT DATA.
        $username = $_POST['username'];
        $email = $_POST['email'];
        $firstname = $_POST['firstname'];
        $lastname = $_POST['lastname'];
        $password = $_POST['password'];
        $status = $_POST['status'];
        $accounttype = $_POST['accounttype'];
        $connector  = new DbConnector();
        
        $sql = "insert into user_account(username, email, first_name, last_name, password, status_id, account_type) 
                VALUES('$username', '$email', '$firstname', '$lastname', '$password', '$status', '$accounttype');";
        $result = $connector->query($sql);
        
        echo "Success";
    }
?>